<template>
	<!--订单页面-->
	<view class="wrapper" :style="{height:wrapperHeight +'px'}">
		<view class="container" :style="{height: containerHeight + 'px'}">
			<view class="curstom">
				<view class="filterTime">
					业务员:{{OperatorName}}
				</view>
				<view class="filterTime">
					<text>{{startTime}}</text>
					<text>{{endTime}}</text>
				</view>
			</view>
			<view class="orderList" :style="{height: orderListHeight + 'px'}" v-show="isList">
				<view class="orderNav" :style="{width:tdAllWidth+'px'}" @tap="changeWidth()">
					<text :style="{width:tdWidth[0]+'px'}">
						序号
					</text>
					<text :style="{width:tdWidth[1]+'px'}">
						编号
					</text>
					<text :style="{width:tdWidth[2]+'px'}">
						业务员
					</text>
					<text :style="{width:tdWidth[3]+'px'}" @tap.stop.prevent="paixu1(0)">
						{{isSale?"销售数量":"进货数量"}}
						<label class="text-blue text-xl" :class="paixu?'cuIcon-triangledownfill':'cuIcon-triangleupfill'"></label>
					</text>
					<text :style="{width:tdWidth[4]+'px'}" @tap.stop.prevent="paixu1(1)">
						{{isSale?"销售金额":"进货金额"}}
						<label class="text-blue text-xl" :class="paixu?'cuIcon-triangledownfill':'cuIcon-triangleupfill'"></label>
					</text>
					<text :style="{width:tdWidth[5]+'px'}" @tap.stop.prevent="paixu1(2)">
						退货数量
						<label class="text-blue text-xl" :class="paixu?'cuIcon-triangledownfill':'cuIcon-triangleupfill'"></label>
					</text>
					<text :style="{width:tdWidth[6]+'px'}" @tap.stop.prevent="paixu1(3)">
						退货金额
						<label class="text-blue text-xl" :class="paixu?'cuIcon-triangledownfill':'cuIcon-triangleupfill'"></label>
					</text>
					<text :style="{width:tdWidth[7]+'px'}" @tap.stop.prevent="paixu1(4)">
						差异数量
						<label class="text-blue text-xl" :class="paixu?'cuIcon-triangledownfill':'cuIcon-triangleupfill'"></label>
					</text>
					<text :style="{width:tdWidth[8]+'px'}" @tap.stop.prevent="paixu1(5)">
						差异金额
						<label class="text-blue text-xl" :class="paixu?'cuIcon-triangledownfill':'cuIcon-triangleupfill'"></label>
					</text>
					<text :style="{width:tdWidth[9]+'px'}" @tap.stop.prevent="paixu1(6)">
						{{isSale?"销售数(未审)":"进货数(未审)"}}
						<label class="text-blue text-xl" :class="paixu?'cuIcon-triangledownfill':'cuIcon-triangleupfill'"></label>
					</text>
					<text :style="{width:tdWidth[10]+'px'}" @tap.stop.prevent="paixu1(7)">
						退货数(未审)
						<label class="text-blue text-xl" :class="paixu?'cuIcon-triangledownfill':'cuIcon-triangleupfill'"></label>
					</text>
				</view>
				<view class="orderLi" :style="{height:orderLiHeight +'px',width:tdAllWidth+'px'}">
					<view class="orderItem" v-for="(item,index) in orderList" :key="index">
						<text :style="{width:tdWidth[0]+'px'}">
							{{index+1}}
						</text>
						<text :style="{width:tdWidth[1]+'px'}">
							{{item.OperatorCode}}
						</text>
						<text :style="{width:tdWidth[2]+'px'}">
							{{item.OperatorName}}
						</text>
						<text :style="{width:tdWidth[3]+'px'}">
							{{item.real_qty|sendFloat}}
						</text>
						<text :style="{width:tdWidth[4]+'px'}">
							{{item.real_Amount|sendFloat}}
						</text>
						<text :style="{width:tdWidth[5]+'px'}">
							{{item.return_qty|sendFloat}}
						</text>
						<text :style="{width:tdWidth[6]+'px'}">
							{{item.return_Amount |sendFloat}}
						</text>
						<text :style="{width:tdWidth[7]+'px'}">
							{{item.Qty|sendFloat}}
						</text>
						<text :style="{width:tdWidth[8]+'px'}">
							{{item.Amount|sendFloat}}
						</text>
						<text :style="{width:tdWidth[9]+'px'}">
							{{item.real_qty2|sendFloat}}
						</text>
						<text :style="{width:tdWidth[10]+'px'}">
							{{item.return_qty2|sendFloat}}
						</text>
					</view>
				</view>
				<view class="allPrice" :style="{width:tdAllWidth+'px'}">
					<text :style="{width:tdWidth[0]+'px'}">
						小计
					</text>
					<text :style="{width:tdWidth[1]+'px'}">

					</text>
					<text :style="{width:tdWidth[2]+'px'}">

					</text>
					<text :style="{width:tdWidth[3]+'px'}">
						{{inPurSaleQty|sendFloat}}
					</text>
					<text :style="{width:tdWidth[4]+'px'}">
						{{inPurSaleAmount|sendFloat}}
					</text>
					<text :style="{width:tdWidth[5]+'px'}">
						{{outPurQty|sendFloat}}
					</text>
					<text :style="{width:tdWidth[6]+'px'}">
						{{outPurAmount|sendFloat}}
					</text>
					<text :style="{width:tdWidth[7]+'px'}">
						{{cyQty|sendFloat}}
					</text>
					<text :style="{width:tdWidth[8]+'px'}">
						{{cyAmount|sendFloat}}
					</text>
					<text :style="{width:tdWidth[9]+'px'}">
						{{inGetQty|sendFloat}}
					</text>
					<text :style="{width:tdWidth[10]+'px'}">
						{{ouGetQty|sendFloat}}
					</text>
				</view>
			</view>
			<view class="orderLookAllList" :style="{height: orderListHeight + 'px'}" v-show="!isList">
				<view class="orderLookItem" v-for="(item,index) in orderList" :style="{ display:(nowRote === index) ? 'table':'block'}"
				 :key="index" @tap="lookMore(index)">
					<text>{{index+1}}</text>
					<text>编号:{{item.OperatorCode}}</text>
					<text>业务员:{{item.OperatorName}}</text>
					<text>{{isSale?"销售数量":"进货数量"}}:{{item.real_qty|sendFloat}}</text>
					<text>{{isSale?"销售金额":"进货金额"}}:{{item.real_Amount|sendFloat}}</text>
					<text>退货数量:{{item.return_qty|sendFloat}}</text>
					<text>退货金额:{{item.return_Amount|sendFloat}}</text>
					<text>差异数量:{{item.Qty|sendFloat}}</text>
					<text>差异金额:{{item.Amount|sendFloat}}</text>
					<text>{{isSale?"销售数(未审)":"进货数(未审)"}}:{{item.real_qty2|sendFloat}}</text>
					<text>退货数(未审):{{item.return_qty2|sendFloat}}</text>
					<!-- <button class="lookMoreInfo" :style="{ transform :(nowRote == index)  ? 'rotate(180deg)':'rotate( 0deg)'}"></button> -->
					<button class="lookMoreInfo" >
						{{nowRote == index?'收起':'展开'}}
					</button>
				</view>
			</view>
		</view>
		<view class="cu-modal" :class="showChange?'show':'hide'">
			<view class="cu-dialog">
				<view class="cu-bar bg-white justify-end">
					<view class="content">设置表格列宽度</view>
					<view class="action" @tap="hideChaneg">
						<text class="cuIcon-close text-red"></text>
					</view>
				</view>
				<view class="padding-xl">
					<view class="padding-xl-item">
						<text>序号:</text><input v-model="tdWidthList[0]" />
					</view>
					<view class="padding-xl-item">
						<text>编号:</text><input v-model="tdWidthList[1]" />
					</view>
					<view class="padding-xl-item">
						<text>业务员:</text><input v-model="tdWidthList[2]" />
					</view>
					<view class="padding-xl-item">
						<text>{{isSale?"销售数量":"进货数量"}}:</text><input v-model="tdWidthList[3]" />
					</view>
					<view class="padding-xl-item">
						<text>{{isSale?"销售金额":"进货金额"}}:</text><input v-model="tdWidthList[4]" />
					</view>
					<view class="padding-xl-item">
						<text>退货数量:</text><input v-model="tdWidthList[5]" />
					</view>
					<view class="padding-xl-item">
						<text>退货金额:</text><input v-model="tdWidthList[6]" />
					</view>
					<view class="padding-xl-item">
						<text>差异数量:</text><input v-model="tdWidthList[7]" />
					</view>
					<view class="padding-xl-item">
						<text>差异金额:</text><input v-model="tdWidthList[8]" />
					</view>
					<view class="padding-xl-item">
						<text>{{isSale?"销售数(未审)":"进货数(未审)"}}:</text><input v-model="tdWidthList[9]" />
					</view>
					<view class="padding-xl-item">
						<text>退货数(未审):</text><input v-model="tdWidthList[10]" />
					</view>
				</view>
				<view class="cu-bar bg-white justify-end">
					<view class="action">
						<button class="cu-btn bg-grey float-left" @tap="hideChaneg">取消</button>
						<button class="cu-btn stop margin-left" @tap="sureSetting">确定</button>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script src="./accountOrder.js"></script>
<style lang="scss">
	@import url('../../style/changecolum.scss');
	@import '@/static/bbCss/bb.scss';
</style>
